const Sequelize = require('sequelize');
const sequelize = require('../config/sequelizeBase');

const ArticleStatuModel = sequelize.define('articlestatu',{
	id:{
		type:Sequelize.BIGINT,
		primaryKey:true,
		allowNull:false,
		autoIncrement:true
	},
	userid:{
		type:Sequelize.STRING(500),
		allowNull:true,
		// unique: true
	},
	articleid:{
		type:Sequelize.STRING(500),
		allowNull:true,
		// unique: true
	},
    liked:{
		type:Sequelize.ENUM('0','1'),
		defaultValue: '0',
		allowNull:false
	},

//点赞数量
	thumbs:{
		type:Sequelize.BIGINT,
		allowNull:true
	},
	reviewnumber:{
		type:Sequelize.BIGINT,
		allowNull:true
	},


	createtime:{
		type:Sequelize.DATE,
		allowNull:false
	},
},{
	timestamps:false,
});


// ArticleStatuModel.sync(); 
module.exports = ArticleStatuModel;